package likou;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/05/31 22:22
 */
public class _342 {
    public static void main(String[] args) {
        System.out.println(isPowerOfFour2(32));
    }
    public static boolean isPowerOfFour(int n) {
        String s = Integer.toBinaryString(n);
        int len = s.length();
        if ((len-1)%2!=0){
            return false;
        }
        return (n ^ (1 << (len-1))) == 0;
    }
    public static boolean isPowerOfFour2(int n) {
        if(n<=0){
            return false;
        }
        double temp = Math.log(16)/Math.log(4);
        System.out.println(temp);
        if(temp%2==0){
            return true;
        }else{
            return false;
        }
    }
}
